﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_Basics.TMS_Vehicles
{
    public class TMS_VehiclesAppService : ApplicationService
    {
        private readonly ITMS_VehicleModel  _tMS_VehicleModel;
        public TMS_VehiclesAppService(ITMS_VehicleModel  tMS_VehicleModel)
        {
            _tMS_VehicleModel = tMS_VehicleModel;
        }

        public async Task<PageResponse<TMS_VehicleModelDto>> GetVehicles(string V_model, string V_licenseplate, string V_drivere, string V_company, int pageindex = 1, int pagesize = 5)
        {
            return await _tMS_VehicleModel.GetVehicles(V_model, V_licenseplate, V_drivere, V_company, pageindex, pagesize);
        
        }

        public async Task<int> CreateVehic(AddDtoVehicles info) {
            return await _tMS_VehicleModel.CreateVehic(info);
        }

        public async Task<int> DeleteVehicle(string Id) { 
            return await _tMS_VehicleModel.DeleteVehicle(Id);
        }
    }
}
